using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using MicroFractal.iTunesBrowser.Business;

namespace MicroFractal.iTunesBrowser.Core.Device
{
    public interface IDevice : IDisposable
    {
        event DownloadProgressEventHandler DownloadCompleted;
        event DownloadProgressEventHandler DownloadProgressChange;
        event System.ComponentModel.PropertyChangedEventHandler StatusChanged;

        string Name { get; }
        string DBRootPath { get; }
        string SerialID { get; }
        bool CanDirectlyAccessFiles { get; }
        DeviceStatusEnum Status { get; }

        MemoryStream GetDBFile();
        MemoryStream GetDBFile(bool refresh);
        string GetSongFileName(Song song);

        int Download(IList<IDownloadableObject> items, string downloadPath, bool createTree);
        int AsyncDownload(IList<IDownloadableObject> items, string downloadPath, bool createTree);
        bool CancelDownload();

        string GetFilePath(Song song);
    }
}
